package GUI;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.SwingUtilities;
import javax.swing.WindowConstants;

/**
 * This code was edited or generated using CloudGarden's Jigloo SWT/Swing GUI
 * Builder, which is free for non-commercial use. If Jigloo is being used
 * commercially (ie, by a corporation, company or business for any purpose
 * whatever) then you should purchase a license for each developer using Jigloo.
 * Please visit www.cloudgarden.com for details. Use of Jigloo implies
 * acceptance of these licensing terms. A COMMERCIAL LICENSE HAS NOT BEEN
 * PURCHASED FOR THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED LEGALLY FOR
 * ANY CORPORATE OR COMMERCIAL PURPOSE.
 */
public class InicioHex extends javax.swing.JFrame {
	/**
	 * 
	 */
	private static final long serialVersionUID = 8114401463894944579L;
	
	
	private JMenuBar menu;
	private JMenuItem Salir;
	private JMenuItem acerca;
	private JMenu informacion;
	private JMenuItem nuevoJuego;
	private JMenu opciones;

	public static void main(String[] args) {
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				InicioHex inst = new InicioHex();
				inst.setLocationRelativeTo(null);
				inst.setVisible(true);
			}
		});
	}

	public InicioHex() {
		super();
		initGUI();
	}

	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			getContentPane().setLayout(null);
			{
				menu = new JMenuBar();
				setJMenuBar(menu);
				{
					opciones = new JMenu();
					menu.add(opciones);
					opciones.setText("Opciones");
					{
						nuevoJuego = new JMenuItem();
						opciones.add(nuevoJuego);
						nuevoJuego.setText("Nuevo Juego     (Ctrl N)");
						nuevoJuego.addActionListener(new ActionListener() {
							@Override
							public void actionPerformed(ActionEvent e) {
								TamanioTablero t = new TamanioTablero();
								t.setLocationRelativeTo(null);
								t.setVisible(true);

							}
						});

					}
					
					{
						Salir = new JMenuItem();
						opciones.add(Salir);
						Salir.setText("Salir                     (Alt F4)");
						Salir.addActionListener(new ActionListener() {
							@Override
							public void actionPerformed(ActionEvent e) {
								dispose();

							}
						});

					}
				}
				{
					informacion = new JMenu();
					menu.add(informacion);
					informacion.setText("?");
					{
						acerca = new JMenuItem();
						informacion.add(acerca);
						acerca.setText("Acerca de...");
						acerca.addActionListener(new ActionListener() {
							@Override
							public void actionPerformed(ActionEvent arg0) {
								Acerca a = new Acerca();
								a.setLocationRelativeTo(null);
								a.setVisible(true);
								
							}
						});
					}
				}
			}

			{
				PanelConFondo pf = new PanelConFondo();
				getContentPane().add(pf);
				pf.setBounds(0, 0, 523, 327);
			}

			pack();
			this.setSize(539, 389);
			this.setResizable(false);
			this.setTitle("Hex");
		} catch (Exception e) {
			// add your error handling code here
			e.printStackTrace();
		}
	}

}